﻿
@{
    ViewBag.Title = "工艺配置";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
@model IOA.MES.DataAccess.VModel.VViaSiteConfig
@section Contents{
    <style>
        .layui-form-label {
            width: auto;
        }

        .tabFrame {
            width: 100%;
            height: calc(100vh - 185px);
            border-width: 0;
        }
    </style>
}

<div id="page"></div>

<script type="text/template" id="tplPage">
    <div style="padding: 20px; background-color: #F2F2F2;">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                <div class="layui-row">
                    <div class="layui-col-xs6 layui-inline">
                        <div class="layui-input-inline">
                            {{lang.Field.OrderNo}}：@ViewBag.OrderNo
                        </div>
                    </div>
                    <div class="layui-col-xs6 layui-inline">
                        <div class="layui-input-inline">
                            {{lang.Field.WorkorderNo}}：@ViewBag.WorkOrderNo
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                    <ul class="layui-tab-title">
                        @if (!string.IsNullOrWhiteSpace(ViewBag.WorkOrderNo))
                        {
                            <li class='layui-this'>BOM配置</li>
                            <li>组件过站</li>
                            <li>产线绑定</li>
                        }
                        else
                        {
                            <li class='layui-this'>组件过站</li>
                        }
                        <li>标片绑定</li>
                        <li>物料完整性</li>
                        <li>颜色配置</li>
                        <li>IV上传</li>
                        <li>标签</li>
                        <li>QTime</li>
                        <li>Q1包装条件</li>
                        <li>非Q1包装条件</li>
                        <li>Q1拼柜条件</li>
                        <li>非Q1拼柜条件</li>
                        <li>包护脚配置</li>
                    </ul>
                    <div class="layui-tab-content">
                        @if (!string.IsNullOrWhiteSpace(ViewBag.WorkOrderNo))
                        {
                            <div class="layui-tab-item layui-show">
                                <!--BOM配置-->
                                <iframe class="tabFrame" src="/ParaSetting/GlobalBomMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                            </div>
                            <div class="layui-tab-item">
                                <!--组件过站-->
                                <iframe class="tabFrame" src="/ParaSetting/CompCrossSiteMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                            </div>
                            <div class="layui-tab-item">
                                <!--产线绑定-->
                                <iframe class="tabFrame" src="/ParaSetting/BindLine?workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                            </div>
                        }
                        else
                        {
                            <div class="layui-tab-item layui-show">
                                <!--组件过站-->
                                <iframe class="tabFrame" src="/ParaSetting/CompCrossSiteMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                            </div>
                        }
                        <div class="layui-tab-item">
                            <!--标片绑定-->
                            <iframe class="tabFrame" src="/ParaSetting/StandardPieceBind?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                        </div>
                        <div class="layui-tab-item">
                            <!--物料完整性-->
                            <iframe class="tabFrame" src="/ParaSetting/MaterialInfoControl?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                        </div>
                        <div class="layui-tab-item ">
                            <!--颜色配置-->
                            <iframe class="tabFrame" src="/ParaSetting/ColorMatch?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                        </div>
                        <div class="layui-tab-item ">
                            <!--IV上传-->
                            <iframe class="tabFrame" src="/ParaSetting/IVUploadMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                        </div>
                        <div class="layui-tab-item">
                            <!--标签-->
                            <iframe class="tabFrame" src="/ParaSetting/LableMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                        </div>
                        <div class="layui-tab-item ">
                            <!--QTime-->
                            <iframe class="tabFrame" src="/ParaSetting/QTimeMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                        </div>
                        <div class="layui-tab-item">
                            <!--Q1包装条件-->
                            <iframe class="tabFrame" src="/ParaSetting/PackConditionMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo&qLevelCondition=1"></iframe>
                        </div>
                        <div class="layui-tab-item">
                            <!--非Q1包装条件-->
                            <iframe class="tabFrame" src="/ParaSetting/PackConditionMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo&qLevelCondition=0"></iframe>
                        </div>
                        <div class="layui-tab-item">
                            <!--Q1拼柜条件-->
                            <iframe class="tabFrame" src="/ParaSetting/CabinetConditionMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo&qLevelCondition=1"></iframe>
                        </div>
                        <div class="layui-tab-item">
                            <!--非Q1拼柜条件-->
                            <iframe class="tabFrame" src="/ParaSetting/CabinetConditionMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo&qLevelCondition=0"></iframe>
                        </div>
                        <div class="layui-tab-item">
                            <!--包护脚配置-->
                            <iframe class="tabFrame" src="/ParaSetting/FootProtectMgr?orderNo=@ViewBag.OrderNo&workOrderNo=@ViewBag.WorkOrderNo"></iframe>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>

@section Scripts{
    <script>
        var vm = new Vue({
            el: "#page",
            template: "#tplPage",
            data: {
                lang: JSON.parse(lang).package
            }
        });
        setTimeout(function () {
            initLayui();
        }, 50);

        function initLayui() {
            layui.use(['element'], function () {
            });
        }
    </script>
}
